// 全局注册所有基础组件
import Vue from 'vue'

const requireComponent = require.context('./base', false, /\.(vue|js)$/)
requireComponent.keys().forEach(filename => {
  const componentConfig = requireComponent(filename)
  const componentName = 'Base' + filename.split('/').pop().replace(/\.\w+$/, '')

  Vue.component(
    componentName,
    componentConfig.default || componentConfig
  )
})
